3.631 \(\int \cos ^5(c+d x) (a+b \sin (c+d x))^m \, dx\)

Optimal. Leaf size=167 \[ \frac{\left (a^2-b^2\right )^2 (a+b \sin (c+d x))^{m+1}}{b^5 d (m+1)}-\frac{4 a \left (a^2-b^2\right ) (a+b \sin (c+d x))^{m+2}}{b^5 d (m+2)}+\frac{2 \left (3 a^2-b^2\right ) (a+b \sin (c+d x))^{m+3}}{b^5 d (m+3)}-\frac{4 a (a+b \sin (c+d x))^{m+4}}{b^5 d (m+4)}+\frac{(a+b \sin (c+d x))^{m+5}}{b^5 d (m+5)} \]

[Out]

((a^2 - b^2)^2*(a + b*Sin[c + d*x])^(1 + m))/(b^5*d*(1 + m)) - (4*a*(a^2 - b^2)*(a + b*Sin[c + d*x])^(2 + m))/
(b^5*d*(2 + m)) + (2*(3*a^2 - b^2)*(a + b*Sin[c + d*x])^(3 + m))/(b^5*d*(3 + m)) - (4*a*(a + b*Sin[c + d*x])^(
4 + m))/(b^5*d*(4 + m)) + (a + b*Sin[c + d*x])^(5 + m)/(b^5*d*(5 + m))

________________________________________________________________________________________

Rubi [A]  time = 0.112014, antiderivative size = 167, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {2668, 697} \[ \frac{\left (a^2-b^2\right )^2 (a+b \sin (c+d x))^{m+1}}{b^5 d (m+1)}-\frac{4 a \left (a^2-b^2\right ) (a+b \sin (c+d x))^{m+2}}{b^5 d (m+2)}+\frac{2 \left (3 a^2-b^2\right ) (a+b \sin (c+d x))^{m+3}}{b^5 d (m+3)}-\frac{4 a (a+b \sin (c+d x))^{m+4}}{b^5 d (m+4)}+\frac{(a+b \sin (c+d x))^{m+5}}{b^5 d (m+5)} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^5*(a + b*Sin[c + d*x])^m,x]

[Out]

((a^2 - b^2)^2*(a + b*Sin[c + d*x])^(1 + m))/(b^5*d*(1 + m)) - (4*a*(a^2 - b^2)*(a + b*Sin[c + d*x])^(2 + m))/
(b^5*d*(2 + m)) + (2*(3*a^2 - b^2)*(a + b*Sin[c + d*x])^(3 + m))/(b^5*d*(3 + m)) - (4*a*(a + b*Sin[c + d*x])^(
4 + m))/(b^5*d*(4 + m)) + (a + b*Sin[c + d*x])^(5 + m)/(b^5*d*(5 + m))

Rule 2668

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^m*(b^2 - x^2)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && Integer
Q[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \cos ^5(c+d x) (a+b \sin (c+d x))^m \, dx &=\frac{\operatorname{Subst}\left (\int (a+x)^m \left (b^2-x^2\right )^2 \, dx,x,b \sin (c+d x)\right )}{b^5 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\left (a^2-b^2\right )^2 (a+x)^m-4 \left (a^3-a b^2\right ) (a+x)^{1+m}+2 \left (3 a^2-b^2\right ) (a+x)^{2+m}-4 a (a+x)^{3+m}+(a+x)^{4+m}\right ) \, dx,x,b \sin (c+d x)\right )}{b^5 d}\\ &=\frac{\left (a^2-b^2\right )^2 (a+b \sin (c+d x))^{1+m}}{b^5 d (1+m)}-\frac{4 a \left (a^2-b^2\right ) (a+b \sin (c+d x))^{2+m}}{b^5 d (2+m)}+\frac{2 \left (3 a^2-b^2\right ) (a+b \sin (c+d x))^{3+m}}{b^5 d (3+m)}-\frac{4 a (a+b \sin (c+d x))^{4+m}}{b^5 d (4+m)}+\frac{(a+b \sin (c+d x))^{5+m}}{b^5 d (5+m)}\\ \end{align*}

Mathematica [A]  time = 0.914049, size = 169, normalized size = 1.01 \[ \frac{(a+b \sin (c+d x))^{m+1} \left (4 \left (b^2-a^2\right ) \left (\frac{b^2-a^2}{m+1}-\frac{(a+b \sin (c+d x))^2}{m+3}+\frac{2 a (a+b \sin (c+d x))}{m+2}\right )+4 a (a+b \sin (c+d x)) \left (\frac{b^2-a^2}{m+2}-\frac{(a+b \sin (c+d x))^2}{m+4}+\frac{2 a (a+b \sin (c+d x))}{m+3}\right )+b^4 \cos ^4(c+d x)\right )}{b^5 d (m+5)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^5*(a + b*Sin[c + d*x])^m,x]

[Out]

((a + b*Sin[c + d*x])^(1 + m)*(b^4*Cos[c + d*x]^4 + 4*(-a^2 + b^2)*((-a^2 + b^2)/(1 + m) + (2*a*(a + b*Sin[c +
 d*x]))/(2 + m) - (a + b*Sin[c + d*x])^2/(3 + m)) + 4*a*(a + b*Sin[c + d*x])*((-a^2 + b^2)/(2 + m) + (2*a*(a +
 b*Sin[c + d*x]))/(3 + m) - (a + b*Sin[c + d*x])^2/(4 + m))))/(b^5*d*(5 + m))

________________________________________________________________________________________

Maple [F]  time = 0.238, size = 0, normalized size = 0. \begin{align*} \int \left ( \cos \left ( dx+c \right ) \right ) ^{5} \left ( a+b\sin \left ( dx+c \right ) \right ) ^{m}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^5*(a+b*sin(d*x+c))^m,x)

[Out]

int(cos(d*x+c)^5*(a+b*sin(d*x+c))^m,x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+b*sin(d*x+c))^m,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.069, size = 825, normalized size = 4.94 \begin{align*} \frac{{\left (24 \, a^{5} - 80 \, a^{3} b^{2} + 120 \, a b^{4} +{\left (a b^{4} m^{4} + 6 \, a b^{4} m^{3} + 11 \, a b^{4} m^{2} + 6 \, a b^{4} m\right )} \cos \left (d x + c\right )^{4} + 8 \,{\left (a^{3} b^{2} + 3 \, a b^{4}\right )} m^{2} + 4 \,{\left (2 \, a b^{4} m^{3} - 3 \,{\left (a^{3} b^{2} - 3 \, a b^{4}\right )} m^{2} -{\left (3 \, a^{3} b^{2} - 7 \, a b^{4}\right )} m\right )} \cos \left (d x + c\right )^{2} - 24 \,{\left (a^{3} b^{2} - 5 \, a b^{4}\right )} m +{\left (64 \, b^{5} +{\left (b^{5} m^{4} + 10 \, b^{5} m^{3} + 35 \, b^{5} m^{2} + 50 \, b^{5} m + 24 \, b^{5}\right )} \cos \left (d x + c\right )^{4} + 8 \,{\left (3 \, a^{2} b^{3} + b^{5}\right )} m^{2} + 4 \,{\left (8 \, b^{5} +{\left (a^{2} b^{3} + b^{5}\right )} m^{3} +{\left (3 \, a^{2} b^{3} + 7 \, b^{5}\right )} m^{2} + 2 \,{\left (a^{2} b^{3} + 7 \, b^{5}\right )} m\right )} \cos \left (d x + c\right )^{2} - 24 \,{\left (a^{4} b - 3 \, a^{2} b^{3} - 2 \, b^{5}\right )} m\right )} \sin \left (d x + c\right )\right )}{\left (b \sin \left (d x + c\right ) + a\right )}^{m}}{b^{5} d m^{5} + 15 \, b^{5} d m^{4} + 85 \, b^{5} d m^{3} + 225 \, b^{5} d m^{2} + 274 \, b^{5} d m + 120 \, b^{5} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+b*sin(d*x+c))^m,x, algorithm="fricas")

[Out]

(24*a^5 - 80*a^3*b^2 + 120*a*b^4 + (a*b^4*m^4 + 6*a*b^4*m^3 + 11*a*b^4*m^2 + 6*a*b^4*m)*cos(d*x + c)^4 + 8*(a^
3*b^2 + 3*a*b^4)*m^2 + 4*(2*a*b^4*m^3 - 3*(a^3*b^2 - 3*a*b^4)*m^2 - (3*a^3*b^2 - 7*a*b^4)*m)*cos(d*x + c)^2 -
24*(a^3*b^2 - 5*a*b^4)*m + (64*b^5 + (b^5*m^4 + 10*b^5*m^3 + 35*b^5*m^2 + 50*b^5*m + 24*b^5)*cos(d*x + c)^4 +
8*(3*a^2*b^3 + b^5)*m^2 + 4*(8*b^5 + (a^2*b^3 + b^5)*m^3 + (3*a^2*b^3 + 7*b^5)*m^2 + 2*(a^2*b^3 + 7*b^5)*m)*co
s(d*x + c)^2 - 24*(a^4*b - 3*a^2*b^3 - 2*b^5)*m)*sin(d*x + c))*(b*sin(d*x + c) + a)^m/(b^5*d*m^5 + 15*b^5*d*m^
4 + 85*b^5*d*m^3 + 225*b^5*d*m^2 + 274*b^5*d*m + 120*b^5*d)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**5*(a+b*sin(d*x+c))**m,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.14003, size = 1904, normalized size = 11.4 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+b*sin(d*x+c))^m,x, algorithm="giac")

[Out]

((b*sin(d*x + c) + a)^5*(b*sin(d*x + c) + a)^m*m^4 - 4*(b*sin(d*x + c) + a)^4*(b*sin(d*x + c) + a)^m*a*m^4 + 6
*(b*sin(d*x + c) + a)^3*(b*sin(d*x + c) + a)^m*a^2*m^4 - 4*(b*sin(d*x + c) + a)^2*(b*sin(d*x + c) + a)^m*a^3*m
^4 + (b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*a^4*m^4 - 2*(b*sin(d*x + c) + a)^3*(b*sin(d*x + c) + a)^m*b^2
*m^4 + 4*(b*sin(d*x + c) + a)^2*(b*sin(d*x + c) + a)^m*a*b^2*m^4 - 2*(b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)
^m*a^2*b^2*m^4 + (b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*b^4*m^4 + 10*(b*sin(d*x + c) + a)^5*(b*sin(d*x +
c) + a)^m*m^3 - 44*(b*sin(d*x + c) + a)^4*(b*sin(d*x + c) + a)^m*a*m^3 + 72*(b*sin(d*x + c) + a)^3*(b*sin(d*x
+ c) + a)^m*a^2*m^3 - 52*(b*sin(d*x + c) + a)^2*(b*sin(d*x + c) + a)^m*a^3*m^3 + 14*(b*sin(d*x + c) + a)*(b*si
n(d*x + c) + a)^m*a^4*m^3 - 24*(b*sin(d*x + c) + a)^3*(b*sin(d*x + c) + a)^m*b^2*m^3 + 52*(b*sin(d*x + c) + a)
^2*(b*sin(d*x + c) + a)^m*a*b^2*m^3 - 28*(b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*a^2*b^2*m^3 + 14*(b*sin(d
*x + c) + a)*(b*sin(d*x + c) + a)^m*b^4*m^3 + 35*(b*sin(d*x + c) + a)^5*(b*sin(d*x + c) + a)^m*m^2 - 164*(b*si
n(d*x + c) + a)^4*(b*sin(d*x + c) + a)^m*a*m^2 + 294*(b*sin(d*x + c) + a)^3*(b*sin(d*x + c) + a)^m*a^2*m^2 - 2
36*(b*sin(d*x + c) + a)^2*(b*sin(d*x + c) + a)^m*a^3*m^2 + 71*(b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*a^4*
m^2 - 98*(b*sin(d*x + c) + a)^3*(b*sin(d*x + c) + a)^m*b^2*m^2 + 236*(b*sin(d*x + c) + a)^2*(b*sin(d*x + c) +
a)^m*a*b^2*m^2 - 142*(b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*a^2*b^2*m^2 + 71*(b*sin(d*x + c) + a)*(b*sin(
d*x + c) + a)^m*b^4*m^2 + 50*(b*sin(d*x + c) + a)^5*(b*sin(d*x + c) + a)^m*m - 244*(b*sin(d*x + c) + a)^4*(b*s
in(d*x + c) + a)^m*a*m + 468*(b*sin(d*x + c) + a)^3*(b*sin(d*x + c) + a)^m*a^2*m - 428*(b*sin(d*x + c) + a)^2*
(b*sin(d*x + c) + a)^m*a^3*m + 154*(b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*a^4*m - 156*(b*sin(d*x + c) + a
)^3*(b*sin(d*x + c) + a)^m*b^2*m + 428*(b*sin(d*x + c) + a)^2*(b*sin(d*x + c) + a)^m*a*b^2*m - 308*(b*sin(d*x
+ c) + a)*(b*sin(d*x + c) + a)^m*a^2*b^2*m + 154*(b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*b^4*m + 24*(b*sin
(d*x + c) + a)^5*(b*sin(d*x + c) + a)^m - 120*(b*sin(d*x + c) + a)^4*(b*sin(d*x + c) + a)^m*a + 240*(b*sin(d*x
 + c) + a)^3*(b*sin(d*x + c) + a)^m*a^2 - 240*(b*sin(d*x + c) + a)^2*(b*sin(d*x + c) + a)^m*a^3 + 120*(b*sin(d
*x + c) + a)*(b*sin(d*x + c) + a)^m*a^4 - 80*(b*sin(d*x + c) + a)^3*(b*sin(d*x + c) + a)^m*b^2 + 240*(b*sin(d*
x + c) + a)^2*(b*sin(d*x + c) + a)^m*a*b^2 - 240*(b*sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*a^2*b^2 + 120*(b*
sin(d*x + c) + a)*(b*sin(d*x + c) + a)^m*b^4)/((b^4*m^5 + 15*b^4*m^4 + 85*b^4*m^3 + 225*b^4*m^2 + 274*b^4*m +
120*b^4)*b*d)